package com.tailyou.hms.neteasecloudmusic;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.ll_loved_music).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, LovedMusicActivity.class));
            }
        });
        findViewById(R.id.ivSearch).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SharedPreferences sharedPreferences = getSharedPreferences("app_config", MODE_PRIVATE);
                //修改单个数据
                sharedPreferences.edit().putBoolean("is_login", false).commit();
                //情况所有数据
                //sharedPreferences.edit().clear().commit();
            }
        });
    }

}